package com.bifrost.cbentity;

import javax.persistence.*;

/**
 * @author rangf
 * @date 2018/2/27
 */
@Entity
@Table(name = "BHWSC_XSCC")
public class SapSaleLevel {
    private String hierId01;
    private String hierId01Desc;
    private String hierId02;
    private String hierId02Desc;
    private String hierId03;
    private String hierId03Desc;
    private String matnr;
    private String dateFrom;
    private String dateTo;
    private String dstatus;
    private String ddate;
    private Long noid;

    @Basic
    @Column(name = "HIER_ID_01", nullable = true, length = 18)
    public String getHierId01() {
        return hierId01;
    }

    public void setHierId01(String hierId01) {
        this.hierId01 = hierId01;
    }

    @Basic
    @Column(name = "HIER_ID_01_DESC", nullable = true, length = 80)
    public String getHierId01Desc() {
        return hierId01Desc;
    }

    public void setHierId01Desc(String hierId01Desc) {
        this.hierId01Desc = hierId01Desc;
    }

    @Basic
    @Column(name = "HIER_ID_02", nullable = true, length = 18)
    public String getHierId02() {
        return hierId02;
    }

    public void setHierId02(String hierId02) {
        this.hierId02 = hierId02;
    }

    @Basic
    @Column(name = "HIER_ID_02_DESC", nullable = true, length = 80)
    public String getHierId02Desc() {
        return hierId02Desc;
    }

    public void setHierId02Desc(String hierId02Desc) {
        this.hierId02Desc = hierId02Desc;
    }

    @Basic
    @Column(name = "HIER_ID_03", nullable = true, length = 18)
    public String getHierId03() {
        return hierId03;
    }

    public void setHierId03(String hierId03) {
        this.hierId03 = hierId03;
    }

    @Basic
    @Column(name = "HIER_ID_03_DESC", nullable = true, length = 80)
    public String getHierId03Desc() {
        return hierId03Desc;
    }

    public void setHierId03Desc(String hierId03Desc) {
        this.hierId03Desc = hierId03Desc;
    }

    @Basic
    @Column(name = "MATNR", nullable = true, length = 18)
    public String getMatnr() {
        return matnr;
    }

    public void setMatnr(String matnr) {
        this.matnr = matnr;
    }

    @Basic
    @Column(name = "DATE_FROM", nullable = true, length = 10)
    public String getDateFrom() {
        return dateFrom;
    }

    public void setDateFrom(String dateFrom) {
        this.dateFrom = dateFrom;
    }

    @Basic
    @Column(name = "DATE_TO", nullable = true, length = 10)
    public String getDateTo() {
        return dateTo;
    }

    public void setDateTo(String dateTo) {
        this.dateTo = dateTo;
    }

    @Basic
    @Column(name = "DSTATUS", nullable = true, length = 1)
    public String getDstatus() {
        return dstatus;
    }

    public void setDstatus(String dstatus) {
        this.dstatus = dstatus;
    }

    @Basic
    @Column(name = "DDATE", nullable = true, length = 14)
    public String getDdate() {
        return ddate;
    }

    public void setDdate(String ddate) {
        this.ddate = ddate;
    }

    @Id
    @SequenceGenerator(name= "sequence",sequenceName="sequence_sale_level" ,allocationSize=1)
    @GeneratedValue(generator= "sequence",strategy= GenerationType.SEQUENCE)
    @Column(name = "NOID", nullable = false, precision = 0)
    public Long getNoid() {
        return noid;
    }

    public void setNoid(Long noid) {
        this.noid = noid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SapSaleLevel that = (SapSaleLevel) o;

        if (noid != that.noid) return false;
        if (hierId01 != null ? !hierId01.equals(that.hierId01) : that.hierId01 != null) return false;
        if (hierId01Desc != null ? !hierId01Desc.equals(that.hierId01Desc) : that.hierId01Desc != null) return false;
        if (hierId02 != null ? !hierId02.equals(that.hierId02) : that.hierId02 != null) return false;
        if (hierId02Desc != null ? !hierId02Desc.equals(that.hierId02Desc) : that.hierId02Desc != null) return false;
        if (hierId03 != null ? !hierId03.equals(that.hierId03) : that.hierId03 != null) return false;
        if (hierId03Desc != null ? !hierId03Desc.equals(that.hierId03Desc) : that.hierId03Desc != null) return false;
        if (matnr != null ? !matnr.equals(that.matnr) : that.matnr != null) return false;
        if (dateFrom != null ? !dateFrom.equals(that.dateFrom) : that.dateFrom != null) return false;
        if (dateTo != null ? !dateTo.equals(that.dateTo) : that.dateTo != null) return false;
        if (dstatus != null ? !dstatus.equals(that.dstatus) : that.dstatus != null) return false;
        if (ddate != null ? !ddate.equals(that.ddate) : that.ddate != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = hierId01 != null ? hierId01.hashCode() : 0;
        result = 31 * result + (hierId01Desc != null ? hierId01Desc.hashCode() : 0);
        result = 31 * result + (hierId02 != null ? hierId02.hashCode() : 0);
        result = 31 * result + (hierId02Desc != null ? hierId02Desc.hashCode() : 0);
        result = 31 * result + (hierId03 != null ? hierId03.hashCode() : 0);
        result = 31 * result + (hierId03Desc != null ? hierId03Desc.hashCode() : 0);
        result = 31 * result + (matnr != null ? matnr.hashCode() : 0);
        result = 31 * result + (dateFrom != null ? dateFrom.hashCode() : 0);
        result = 31 * result + (dateTo != null ? dateTo.hashCode() : 0);
        result = 31 * result + (dstatus != null ? dstatus.hashCode() : 0);
        result = 31 * result + (ddate != null ? ddate.hashCode() : 0);
        result = 31 * result + (int) (noid ^ (noid >>> 32));
        return result;
    }
}
